<template>
  <div class="carousel-content"
       v-if="list.length">
    <el-carousel height="400px">
      <el-carousel-item v-for="(item,index) in list"
                        :key="index">
        <div class="carousel-body"
             :style="`background-image: url(${item.image.url})`">
          <h3 class="small">{{ item.title }}</h3>
        </div>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  props: {
    list: {
      type: Array,
      default: () => []
    }
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
.carousel-body {
  height: 400px;
  background-size: cover;
  h3 {
    color: #fff;
    font-size: 14px;
    opacity: 0.75;
    line-height: 400px;
    margin: 0;
  }
}
</style>